<?php 
    $firstContent = $otherContent = array();
    //Lay danh sach slide
    $content = array();
    $condsDefault = $this->String->condsDefault();
    $condsDefault = array_merge($condsDefault,array('NodeTerm.term_id' => 36));
    $fields = $this->String->nodeFields();
    $fields = array_merge($fields,array('Node.field_embed_youtube')); 
    $order = $this->String->orderFields();
    $opt = array(
        'conditions' => $condsDefault,
        'find' => 'all',
        'fields' => $fields,
        'locale' => true,
        'order' => 'rand()'
    );
    $content = $this->String->get_data('Node','NodeTerm',$opt);
    if(!empty($content)){
         $firstContent = $content[0];
         unset($content[0]);
         if(count($content)>0){
             $otherContent = $content;
         }
    } 
?>
<div class="asbl-r">
    <h3 class="tit-bd"><span class="icon-cus-video mr10"></span><?php echo __d('default','Video Clips');?></h3>
    <div class="asbl-rct">
        <?php if(!empty($firstContent)):?>
            <div class="embed-responsive embed-responsive-16by9">
                <iframe class="embed-responsive-item" src="<?php echo $firstContent['Node']['field_embed_youtube'];?>"></iframe>
            </div>
        <?php endif;?>
        <ul class="news-list-nbd">
            <?php if(!empty($otherContent)):?>
                <?php foreach($otherContent as $key => $values):?>
                    <li class="item-bg">
                        <a href="<?php echo $this->Html->url(array('plugin'=>'View','controller'=>'View','action'=>'video_usis',$values['Node']['alias']));?>" class="gr-tlk"><?php echo String::truncate($values['Node']['title'],80);?></a>
                    </li>
                <?php endforeach;?>
            <?php endif;?>
        </ul>
        <p class="tar"><a href="<?php echo $this->Html->url(array('plugin'=>'View','controller'=>'View','action'=>'video_usis',$values['Node']['alias']));?>" class="show-more-link"><?php echo __d('default','Xem tất cả');?> »</a></p>
    </div>
</div>